import { defineConfig } from 'vite'

export default defineConfig({
  build: {
    lib: {
      entry: './index.js',
      name: 'peach',
      fileName: format => `peach.${format}.js`
    },
    rollupOptions: {
      external: ['@wattjs/tool'],
      output: {
        exports: 'named',
        globals: {
          '@wattjs/tool': 'WattTool'
        }
      }
    }
  }
})
